package com.twu.biblioteca;

public class LibraryBook {
    private String title;
    private boolean checkedOut;

    public LibraryBook(String title) {
        this.title = title;
        checkedOut = false;
    }

    public boolean tryCheckOut() {
        boolean success = !checkedOut;
        checkedOut = true;
        return success;
    }

    public boolean tryCheckIn() {
        boolean success = checkedOut;
        checkedOut = false;
        return success;
    }

    public String toString(){
        return title;
    }
}
